import request from "@/utils/request";

/**
 * 商品接口
 */

// 分页查询商品列表。实现了搜索功能
export const pagingQuery = (params) => {
  return request({
    method: "GET",
    url: "/goods/pagingQuery",
    params
  })
}

  // 修改商品状态
export const changeStatus = (gId, status) => {
  return request({
    method: "PUT",
    url: `/goods/${gId}/${status}`,
  });
};

// 删除商品
export const deleteGoods = (gId) => {
  return request({
    method: "DELETE",
    url: `/goods/${gId}`,
  });
};